package bizlogic;

import java.sql.SQLException;

import model.OvertimeDTO;
import dao.DAOException;
import dao.DAOfactory;
import dao.OvertimeDAO;

public class OverTimeController {
	
	private OvertimeDAO overTime;

	public OverTimeController(){
		overTime= DAOfactory.loadInstance().getOvertimeDAO();
		
		//overTime.addOvertime(oneOvertime)
	}
	public void AddCompensation(OvertimeDTO oneOverTime)
	{
		try {
			
			overTime.addOvertime(oneOverTime);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (DAOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public int creatOverTimeID() throws SQLException{
		int count = overTime.countAllOvertime();
		count++;
		return count;
	}
	}

